package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 口味表
 */
@Mapper
public interface DishFlavorMapper {
    /**
     * 批量插入口味
     * @param flavorList
     */
    //@AutoFill(OperationType.INSERT)
    void insertBatchDishFlavor(List<DishFlavor> flavorList);

    /**
     * 根据菜品id查菜品口味
     * @param
     * @return
     */
    @Select("select * from sky_take_out.dish_flavor where dish_id = #{dishId}")
    List<DishFlavor> getDishFlavorByDishId(Long dishId);

    /**
     * 根据菜品id,批量删除口味
     * @param
     */
    void deleteBatchDishFlavor(List<Long> dishIds);
}
